<?php if(!defined('IN_DISCUZ')) exit('Access Denied'); ?>
<?php if(!empty($_G['setting']['pluginhooks']['global_footer_mobile'])) echo $_G['setting']['pluginhooks']['global_footer_mobile'];?><?php $useragent = strtolower($_SERVER['HTTP_USER_AGENT']);$clienturl = ''?><?php if(strpos($useragent, 'iphone') !== false || strpos($useragent, 'ios') !== false) { $clienturl = $_G['cache']['mobileoem_data']['iframeUrl'] ? $_G['cache']['mobileoem_data']['iframeUrl'].'&platform=ios' : 'http://www.discuz.net/mobile.php?platform=ios';?><?php } elseif(strpos($useragent, 'android') !== false) { $clienturl = $_G['cache']['mobileoem_data']['iframeUrl'] ? $_G['cache']['mobileoem_data']['iframeUrl'].'&platform=android' : 'http://www.discuz.net/mobile.php?platform=android';?><?php } elseif(strpos($useragent, 'windows phone') !== false) { $clienturl = $_G['cache']['mobileoem_data']['iframeUrl'] ? $_G['cache']['mobileoem_data']['iframeUrl'].'&platform=windowsphone' : 'http://www.discuz.net/mobile.php?platform=windowsphone';?><?php } ?>
<section id="pushbutton"></section>
<div class="banzhuan-clear"></div>
<div id="mask" style="display:none;"></div>
<?php if(!$nofooter) { } ?>
<div class="banzhuan-bottom"></div>
<div id="footbar" class="bottom">
    <div class="fbc">
        <ul>
            <li class="<?php if($_GET['mod'] == 'guide' || $_GET['order'] == 'dateline' || $_GET['order'] == 'replies' || $_GET['order'] == 'views' || $_GET['order'] == 'digest') { ?> a<?php } ?>"><a href="/" class="iconfont <?php if($_GET['mod'] !== 'guide' && $_GET['order'] !== 'dateline' && $_GET['order'] !== 'replies' && $_GET['order'] !== 'views' && $_GET['order'] !== 'digest' && $_GET['mod'] !== 'space' && $_GET['mod'] !== 'forum' && $_GET['mod'] !== 'spacecp' && $_GET['mod'] !== 'logging' && $_GET['mod'] !== 'register' && $_GET['mod'] !== 'post' && $_GET['action'] !== 'nav') { ?>icon-homefill<?php } else { ?>icon-home<?php } ?>"></a></li>
            <li class="<?php if($_GET['mod'] !== 'guide' && $_GET['order'] !== 'dateline' && $_GET['order'] !== 'replies' && $_GET['order'] !== 'views' && $_GET['order'] !== 'digest' && $_GET['mod'] !== 'space' && $_GET['mod'] !== 'forum' && $_GET['mod'] !== 'spacecp' && $_GET['mod'] !== 'logging' && $_GET['mod'] !== 'register' && $_GET['mod'] !== 'post' && $_GET['action'] !== 'nav') { ?> a<?php } ?>"><a href="/bbs/forum.php?mod=guide&amp;view=hot&amp;mobile=2" class="iconfont  <?php if($_GET['mod'] == 'guide' || $_GET['order'] == 'dateline' || $_GET['order'] == 'replies' || $_GET['order'] == 'views' || $_GET['order'] == 'digest') { ?>icon-search2<?php } else { ?>icon-search1<?php } ?>"></a></li>
            <li class="<?php if($_GET['mod'] == 'post' || $_GET['action'] == 'nav') { ?> a<?php } ?>"><a href="javascript:;" id="releasebbs" class=" iconfont <?php if($_GET['mod'] == 'post' || $_GET['action'] == 'nav') { ?>icon-writefill<?php } else { ?>icon-write<?php } ?>"></a></li>
            <li class="<?php if($_GET['mod'] == 'forum') { ?> a<?php } ?>"><a href="/user/message" id="bbs_count" class="iconfont <?php if($_GET['mod'] == 'forum') { ?>icon-markfill<?php } else { ?>icon-mark<?php } ?>" style="position: relative;"></a></li>
            <li class="<?php if($_GET['mod'] == 'space' || $_GET['mod'] == 'spacecp' && $_GET['type'] != 'forum') { ?> a<?php } ?>"><a href="/user" class="iconfont <?php if($_GET['mod'] == 'space' || $_GET['mod'] == 'spacecp' && $_GET['type'] != 'forum') { ?>icon-peoplefill<?php } else { ?>icon-people<?php } ?>"></a><?php if($_G['member']['newpm']) { ?><em></em><?php } ?></li>
        </ul>
    </div>
</div>
<script>window.jQuery || document.write('<script src="js/jquery-2.1.1.min.js"><\/script>')</script>
<script>
    jQuery("#releasebbs").click(function(){
        var id="<?php echo $_G['uid'];?>";
        // var id3="<?php echo $_SESSION['bbs_uid'];?>"
        if(id == "" ){
            alert("登录之后才能发起活动！");
        }else{

            var urllianjie='/api/userinfo?action=get_userinfo&id='+id;
            jQuery.post(urllianjie,{ info_id:id }).success(function(data){
                data = JSON.parse(data);
                
	 if(data.data.if_check!=1 && data.data.gr_type == 4){
                 	alert("请您耐心等待审核通过！");
                 }else if(data.data.if_check!=1 && data.data.gr_type == 1){
                 	alert("Pending! Please be patient.");
                 }
              else{
                if(data.data&&data.data.gr_type == 4 ){
                    self.location='/bbs/forum.php?mod=misc&action=nav&mobile=2';
                }else {
                    pushView();
                }
              }
            })
        }

    });
</script>
<script>

    function pushView () {
        var pub = new Pushbutton('#pushbutton', {
            data: [
                //{text:'Live' },
                {text:'Activity' },
                {text:'Post'}
            ],
            // 点击回调 返回true 则不隐藏弹出框
            onClick: function( e ) {
//         		alert(e.index);
                if(e.index==0){
                    location.reload();
                }
                else if(e.index==1){  //跳转到直播
                    var id="<?php echo $_G['uid'];?>";
                    var urllianjie='/api/userinfo?action=get_userinfo&id='+id;
                        $.post(urllianjie,{ action:"get_userinfo",id:id }).success(function(data){
                            data = JSON.parse(data);
                            if(data.data.gr_type == 4 ){
                                self.location='/bbs/forum.php?mod=misc&action=nav&mobile=2';
                            }else{
                                self.location='/main/post';
                            }
                        })
                    //self.location='/user/mylive';
                }
                else if(e.index==2){  //活动发布 gongkun
                    //self.location='/main/post';
                    self.location='/bbs/forum.php?mod=misc&action=nav&mobile=2';
                }else{
                    //self.location='/bbs/forum.php?mod=misc&action=nav&mobile=2';
//           			self.location='/main/tips';
                }

                return true;
            },
            // maxHeight: 100,  // 默认显示的高度
            isShow: true   // 默认是否显示
        });
    }


    $(function(){
        var user_id="<?php echo $_G['uid'];?>";
        var api_url ='/api/get_msg_count';
        $.post(api_url, { action:"get_msg_count",bbs_uid:user_id}, function(data){
            data = eval('(' + data + ')');

            if(data.message_num > 0){
                var str="<span class=\"msg_num btttom_msg\" style=\"\">"+data.message_num+"</span>";
                $("#bbs_count").append(str);
            }
        })

    })
</script>
</body>
</html><?php updatesession();?><?php if(defined('IN_MOBILE')) { output();?><?php } else { output_preview();?><?php } ?>
